<template>
  <view class="main dispaly-col-center">
    <view class="title">{{ getResponse?.noticeContent }}</view>
    <view class="time">{{ getResponse?.createTime }}</view>
    <view class="desc">
      {{ getResponse?.noticeTitle }}
    </view>
  </view>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import { getNoticeId } from "@/api/apiList";
onLoad((option) => {
  uni.setNavigationBarTitle({
    title: option.type == 1 ? "系统消息" : "社区助手",
  });
  if (option?.id) {
    getDetailInfo(option?.id);
  }
});

const getResponse = ref();
const getDetailInfo = async (ids) => {
  const response = await getNoticeId(ids);
  if (response && response?.code == 200) {
    getResponse.value = response?.data;
  }
};
</script>

<style lang="scss" scoped>
.main {
  padding: 46rpx 76rpx;

  .title {
    font-family: PingFang SC Regular;
    font-size: 32rpx;
    color: #111111;
  }

  .time {
    font-family: PingFang SC Regular;
    font-size: 24rpx;
    color: #999999;
    margin: 20rpx 0 44rpx 0;
  }

  .desc {
    font-family: PingFang SC Regular;
    font-size: 26rpx;
    color: #111111;
  }
}
</style>
